import request from '../../utils/request'

const api_hospital = '/api/hospital/hospital'


//查询医院列表分页
export function getHospitalPage(pageNum, pageSize, data) {
    return request({
        url: `${api_hospital}/page/${pageNum}/${pageSize}`,
        method: 'get',
        data
    })
}


//根据医院名称查询医院集合
export function getHospitalListByHosname(hosname) {
    return request({
        url: `${api_hospital}/get/${hosname}`,
        method: 'get',
    })
}


//根据医院编号获取科室列表
export function getDepartmentByHoscode(hoscode) {
    return request({
        url: `${api_hospital}/department/${hoscode}`,
        method: 'get',
    })
}


//根据医院编号获取预约挂号详情
export function getHospitalDetailByHoscode(hoscode) {
    return request({
        url: `${api_hospital}/get/hospitalDetail/${hoscode}`,
        method: 'get',
    })
}


export function getBookingScheduleRulePage(pageNum,pageSize,hoscode,depcode) {
    return request({
        url: `${api_hospital}/auth/get/bookingScheduleRule/${pageNum}/${pageSize}/${hoscode}/${depcode}`,
        method: 'get',
    })
}


export function getScheduleList(hoscode, depcode, workDate) {
    return request({
        url: `${api_hospital}/auth/get/scheduleList/${hoscode}/${depcode}/${workDate}`,
        method: 'get',
    })
}


export function getScheduleByScheduleId(scheduleId) {
    return request({
        url: `${api_hospital}/get/schedule/${scheduleId}`,
        method: 'get',
    })
}
